At times, application programs need or could benefit from certain system event information. By way of example, an application program that deals with a network may need to determine if the network is available to that program, i.e., whether the computer system is connected to the network and the network is operational. Another application program, such as a word processing program, may benefit from knowing if the state of battery charge was getting critically low, whereby the application program could automatically save a copy of any open files.
To the extent that such system information may be obtained, the mechanisms for obtaining the information are independent within the various applications. For example, each application that deals with the network essentially implements its own technology to determine the state of network connectivity. Such technology uses often crude and incomplete heuristics for this purpose.
Moreover, because many system events such as battery low conditions and network disconnects can happen at any time, some regular calling or polling mechanism is generally needed to detect such conditions. However, such polling consumes resources, which is particularly wasteful since the result is usually unchanged. At the same time, individual polling is redundant. For example, if some system facility (such as an application programming interface, or API) reports the charge of the battery, a word processor, spreadsheet and another application each may be configured to separately and regularly poll the facility to determine the charge.
Particular problems arise with mobile computing, since in mobile computing environments, users often change the state of network connectivity. At the same time, local area network (LAN) connectivity is particularly difficult to detect, since there is not any uniform way to determine the state of LAN connectivity, e.g., LAN cards do not adequately provide the needed connectivity information. Simply monitoring for activity is not sufficient, since even if there is activity on a LAN interface, such activity may be only broadcast/loopback activity, and not indicative of real network connectivity. In short, applications heretofore have not had an integrated model for obtaining computer system event information, including network connectivity and other information.